home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_emacs.idb / usr / freeware / share / emacs / 19.34 / lisp / assoc.elc.z / assoc.elc
Emacs Compiled Lisp  |  1998-10-28  |  4.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 65 72 69 6b 40 6e 61 |piled by| erik@na|
|00000020| 67 67 75 6d 2e 6e 6f 20 | 6f 6e 20 53 75 6e 20 4a |ggum.no |on Sun J|
|00000030| 61 6e 20 31 34 20 30 33 | 3a 34 31 3a 34 36 20 31 |an 14 03|:41:46 1|
|00000040| 39 39 36 0a 3b 3b 3b 20 | 66 72 6f 6d 20 66 69 6c |996.;;; |from fil|
|00000050| 65 20 2f 67 64 2f 67 6e | 75 2f 65 6d 61 63 73 2f |e /gd/gn|u/emacs/|
|00000060| 31 39 2e 30 2f 6c 69 73 | 70 2f 61 73 73 6f 63 2e |19.0/lis|p/assoc.|
|00000070| 65 6c 0a 3b 3b 3b 20 65 | 6d 61 63 73 20 76 65 72 |el.;;; e|macs ver|
|00000080| 73 69 6f 6e 20 31 39 2e | 33 30 2e 37 30 2e 36 2e |sion 19.|30.70.6.|
|00000090| 0a 3b 3b 3b 20 62 79 74 | 65 63 6f 6d 70 20 76 65 |.;;; byt|ecomp ve|
|000000a0| 72 73 69 6f 6e 20 46 53 | 46 20 32 2e 31 30 0a 3b |rsion FS|F 2.10.;|
|000000b0| 3b 3b 20 6f 70 74 69 6d | 69 7a 61 74 69 6f 6e 20 |;; optim|ization |
|000000c0| 69 73 20 6f 6e 2e 0a 3b | 3b 3b 20 74 68 69 73 20 |is on..;|;; this |
|000000d0| 66 69 6c 65 20 75 73 65 | 73 20 6f 70 63 6f 64 65 |file use|s opcode|
|000000e0| 73 20 77 68 69 63 68 20 | 64 6f 20 6e 6f 74 20 65 |s which |do not e|
|000000f0| 78 69 73 74 20 69 6e 20 | 45 6d 61 63 73 20 31 38 |xist in |Emacs 18|
|00000100| 2e 0a 0a 28 69 66 20 28 | 61 6e 64 20 28 62 6f 75 |...(if (|and (bou|
|00000110| 6e 64 70 20 27 65 6d 61 | 63 73 2d 76 65 72 73 69 |ndp 'ema|cs-versi|
|00000120| 6f 6e 29 0a 09 20 28 6f | 72 20 28 61 6e 64 20 28 |on).. (o|r (and (|
|00000130| 62 6f 75 6e 64 70 20 27 | 65 70 6f 63 68 3a 3a 76 |boundp '|epoch::v|
|00000140| 65 72 73 69 6f 6e 29 20 | 65 70 6f 63 68 3a 3a 76 |ersion) |epoch::v|
|00000150| 65 72 73 69 6f 6e 29 0a | 09 20 20 20 20 20 28 73 |ersion).|. (s|
|00000160| 74 72 69 6e 67 2d 6c 65 | 73 73 70 20 65 6d 61 63 |tring-le|ssp emac|
|00000170| 73 2d 76 65 72 73 69 6f | 6e 20 22 31 39 2e 32 39 |s-versio|n "19.29|
|00000180| 22 29 29 29 0a 20 20 20 | 20 28 65 72 72 6f 72 20 |"))). | (error |
|00000190| 22 60 61 73 73 6f 63 2e | 65 6c 27 20 77 61 73 20 |"`assoc.|el' was |
|000001a0| 63 6f 6d 70 69 6c 65 64 | 20 66 6f 72 20 45 6d 61 |compiled| for Ema|
|000001b0| 63 73 20 31 39 2e 32 39 | 20 6f 72 20 6c 61 74 65 |cs 19.29| or late|
|000001c0| 72 22 29 29 0a 0a 0a 23 | 40 32 37 38 20 4d 6f 76 |r"))...#|@278 Mov|
|000001d0| 65 20 61 20 73 70 65 63 | 69 66 69 65 64 20 6b 65 |e a spec|ified ke|
|000001e0| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 74 6f 20 |y-value |pair to |
|000001f0| 74 68 65 20 68 65 61 64 | 20 6f 66 20 61 6e 20 61 |the head| of an a|
|00000200| 6c 69 73 74 2e 0a 54 68 | 65 20 61 6c 69 73 74 20 |list..Th|e alist |
|00000210| 69 73 20 72 65 66 65 72 | 65 6e 63 65 64 20 62 79 |is refer|enced by|
|00000220| 20 41 4c 49 53 54 2d 53 | 59 4d 42 4f 4c 2e 20 4b | ALIST-S|YMBOL. K|
|00000230| 65 79 2d 76 61 6c 75 65 | 20 70 61 69 72 20 74 6f |ey-value| pair to|
|00000240| 20 6d 6f 76 65 20 74 6f | 0a 68 65 61 64 20 69 73 | move to|.head is|
|00000250| 20 6f 6e 65 20 6d 61 74 | 63 68 69 6e 67 20 4b 45 | one mat|ching KE|
|00000260| 59 2e 20 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |Y. Retu|rns the |
|00000270| 73 6f 72 74 65 64 20 6c | 69 73 74 20 61 6e 64 20 |sorted l|ist and |
|00000280| 64 6f 65 73 6e 27 74 20 | 61 66 66 65 63 74 0a 74 |doesn't |affect.t|
|00000290| 68 65 20 6f 72 64 65 72 | 20 6f 66 20 61 6e 79 20 |he order| of any |
|000002a0| 6f 74 68 65 72 20 6b 65 | 79 2d 76 61 6c 75 65 20 |other ke|y-value |
|000002b0| 70 61 69 72 2e 20 20 53 | 69 64 65 20 65 66 66 65 |pair. S|ide effe|
|000002c0| 63 74 20 73 65 74 73 20 | 61 6c 69 73 74 20 74 6f |ct sets |alist to|
|000002d0| 20 6e 65 77 0a 73 6f 72 | 74 65 64 20 6c 69 73 74 | new.sor|ted list|
|000002e0| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 61 73 |...(defa|lias 'as|
|000002f0| 6f 72 74 20 23 5b 28 61 | 6c 69 73 74 2d 73 79 6d |ort #[(a|list-sym|
|00000300| 62 6f 6c 20 6b 65 79 29 | 20 22 08 c1 c2 c3 08 21 |bol key)| ".....!|
|00000310| 21 c4 5c 22 4c 87 22 20 | 5b 61 6c 69 73 74 2d 73 |!.\"L." |[alist-s|
|00000320| 79 6d 62 6f 6c 20 73 6f | 72 74 20 63 6f 70 79 2d |ymbol so|rt copy-|
|00000330| 61 6c 69 73 74 20 65 76 | 61 6c 20 23 5b 28 61 20 |alist ev|al #[(a |
|00000340| 62 29 20 22 08 40 09 9a | 87 22 20 5b 61 20 6b 65 |b) ".@..|." [a ke|
|00000350| 79 5d 20 32 5d 5d 20 35 | 20 28 23 24 20 2e 20 34 |y] 2]] 5| (#$ . 4|
|00000360| 36 31 29 5d 29 0a 23 40 | 31 32 36 20 4d 61 6b 65 |61)]).#@|126 Make|
|00000370| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 61 20 63 6f |s a list| of a co|
|00000380| 6e 73 20 63 65 6c 6c 20 | 63 6f 6e 74 61 69 6e 69 |ns cell |containi|
|00000390| 6e 67 20 63 61 72 20 6f | 66 20 4b 45 59 20 61 6e |ng car o|f KEY an|
|000003a0| 64 20 63 64 72 20 6f 66 | 20 56 41 4c 55 45 2e 0a |d cdr of| VALUE..|
|000003b0| 54 68 65 20 72 65 74 75 | 72 6e 65 64 20 6c 69 73 |The retu|rned lis|
|000003c0| 74 20 69 73 20 73 75 69 | 74 61 62 6c 65 20 61 73 |t is sui|table as|
|000003d0| 20 61 6e 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 61 | an elem|ent of a|
|000003e0| 6e 20 61 6c 69 73 74 2e | 1f 0a 28 64 65 66 61 6c |n alist.|..(defal|
|000003f0| 69 61 73 20 27 61 65 6c | 65 6d 65 6e 74 20 23 5b |ias 'ael|ement #[|
|00000400| 28 6b 65 79 20 76 61 6c | 75 65 29 20 22 08 09 42 |(key val|ue) "..B|
|00000410| 43 87 22 20 5b 6b 65 79 | 20 76 61 6c 75 65 5d 20 |C." [key| value] |
|00000420| 32 20 28 23 24 20 2e 20 | 38 37 36 29 5d 29 0a 23 |2 (#$ . |876)]).#|
|00000430| 40 34 35 20 52 65 74 75 | 72 6e 20 74 68 65 20 6b |@45 Retu|rn the k|
|00000440| 65 79 20 73 79 6d 62 6f | 6c 20 61 74 20 74 68 65 |ey symbo|l at the|
|00000450| 20 68 65 61 64 20 6f 66 | 20 41 4c 49 53 54 2e 1f | head of| ALIST..|
|00000460| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 61 68 65 61 |.(defali|as 'ahea|
|00000470| 64 73 79 6d 20 23 5b 28 | 61 6c 69 73 74 29 20 22 |dsym #[(|alist) "|
|00000480| 08 40 40 87 22 20 5b 61 | 6c 69 73 74 5d 20 31 20 |.@@." [a|list] 1 |
|00000490| 28 23 24 20 2e 20 31 30 | 37 36 29 5d 29 0a 23 40 |(#$ . 10|76)]).#@|
|000004a0| 33 33 35 20 46 69 6e 64 | 20 6f 75 74 20 69 66 20 |335 Find| out if |
|000004b0| 61 20 73 70 65 63 69 66 | 69 65 64 20 6b 65 79 2d |a specif|ied key-|
|000004c0| 76 61 6c 75 65 20 70 61 | 69 72 20 69 73 20 6e 6f |value pa|ir is no|
|000004d0| 74 20 61 74 20 74 68 65 | 20 68 65 61 64 20 6f 66 |t at the| head of|
|000004e0| 20 61 6e 20 61 6c 69 73 | 74 2e 0a 54 68 65 20 61 | an alis|t..The a|
|000004f0| 6c 69 73 74 20 74 6f 20 | 63 68 65 63 6b 20 69 73 |list to |check is|
|00000500| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 41 4c | specifi|ed by AL|
|00000510| 49 53 54 20 61 6e 64 20 | 74 68 65 20 6b 65 79 2d |IST and |the key-|
|00000520| 76 61 6c 75 65 20 70 61 | 69 72 20 69 73 20 74 68 |value pa|ir is th|
|00000530| 65 0a 6f 6e 65 20 6d 61 | 74 63 68 69 6e 67 20 74 |e.one ma|tching t|
|00000540| 68 65 20 73 75 70 70 6c | 69 65 64 20 4b 45 59 2e |he suppl|ied KEY.|
|00000550| 20 20 52 65 74 75 72 6e | 73 20 6e 69 6c 20 69 66 | Return|s nil if|
|00000560| 20 41 4c 49 53 54 20 69 | 73 20 6e 69 6c 2c 20 6f | ALIST i|s nil, o|
|00000570| 72 20 69 66 0a 6b 65 79 | 2d 76 61 6c 75 65 20 70 |r if.key|-value p|
|00000580| 61 69 72 20 69 73 20 61 | 74 20 74 68 65 20 68 65 |air is a|t the he|
|00000590| 61 64 20 6f 66 20 74 68 | 65 20 61 6c 69 73 74 2e |ad of th|e alist.|
|000005a0| 20 20 52 65 74 75 72 6e | 73 20 74 20 69 66 20 6b | Return|s t if k|
|000005b0| 65 79 2d 76 61 6c 75 65 | 0a 70 61 69 72 20 69 73 |ey-value|.pair is|
|000005c0| 20 6e 6f 74 20 61 74 20 | 74 68 65 20 68 65 61 64 | not at |the head|
|000005d0| 20 6f 66 20 61 6c 69 73 | 74 2e 20 20 41 4c 49 53 | of alis|t. ALIS|
|000005e0| 54 20 69 73 20 6e 6f 74 | 20 61 6c 74 65 72 65 64 |T is not| altered|
|000005f0| 2e 1f 0a 28 64 65 66 61 | 6c 69 61 73 20 27 61 6e |...(defa|lias 'an|
|00000600| 6f 74 2d 68 65 61 64 2d | 70 20 23 5b 28 61 6c 69 |ot-head-|p #[(ali|
|00000610| 73 74 20 6b 65 79 29 20 | 22 c0 09 21 5c 6e 9a 3f |st key) |"..!\n.?|
|00000620| 87 22 20 5b 61 68 65 61 | 64 73 79 6d 20 61 6c 69 |." [ahea|dsym ali|
|00000630| 73 74 20 6b 65 79 5d 20 | 32 20 28 23 24 20 2e 20 |st key] |2 (#$ . |
|00000640| 31 31 38 38 29 5d 29 0a | 23 40 36 30 35 20 49 6e |1188)]).|#@605 In|
|00000650| 73 65 72 74 73 20 61 20 | 6b 65 79 2d 76 61 6c 75 |serts a |key-valu|
|00000660| 65 20 70 61 69 72 20 69 | 6e 74 6f 20 61 6e 20 61 |e pair i|nto an a|
|00000670| 6c 69 73 74 2e 0a 54 68 | 65 20 61 6c 69 73 74 20 |list..Th|e alist |
|00000680| 69 73 20 72 65 66 65 72 | 65 6e 63 65 64 20 62 79 |is refer|enced by|
|00000690| 20 41 4c 49 53 54 2d 53 | 59 4d 42 4f 4c 2e 20 54 | ALIST-S|YMBOL. T|
|000006a0| 68 65 20 6b 65 79 2d 76 | 61 6c 75 65 20 70 61 69 |he key-v|alue pai|
|000006b0| 72 20 69 73 20 6d 61 64 | 65 0a 66 72 6f 6d 20 4b |r is mad|e.from K|
|000006c0| 45 59 20 61 6e 64 20 6f | 70 74 69 6f 6e 61 6c 6c |EY and o|ptionall|
|000006d0| 79 2c 20 56 41 4c 55 45 | 2e 20 52 65 74 75 72 6e |y, VALUE|. Return|
|000006e0| 73 20 74 68 65 20 61 6c | 74 65 72 65 64 20 61 6c |s the al|tered al|
|000006f0| 69 73 74 20 6f 72 20 6e | 69 6c 20 69 66 0a 41 4c |ist or n|il if.AL|
|00000700| 49 53 54 20 69 73 20 6e | 69 6c 2e 0a 0a 49 66 20 |IST is n|il...If |
|00000710| 74 68 65 20 6b 65 79 2d | 76 61 6c 75 65 20 70 61 |the key-|value pa|
|00000720| 69 72 20 72 65 66 65 72 | 65 6e 63 65 64 20 62 79 |ir refer|enced by|
|00000730| 20 4b 45 59 20 63 61 6e | 20 62 65 20 66 6f 75 6e | KEY can| be foun|
|00000740| 64 20 69 6e 20 74 68 65 | 20 61 6c 69 73 74 2c 20 |d in the| alist, |
|00000750| 61 6e 64 0a 56 41 4c 55 | 45 20 69 73 20 73 75 70 |and.VALU|E is sup|
|00000760| 70 6c 69 65 64 20 6e 6f | 6e 2d 6e 69 6c 2c 20 74 |plied no|n-nil, t|
|00000770| 68 65 6e 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |hen the |value of|
|00000780| 20 4b 45 59 20 77 69 6c | 6c 20 62 65 20 73 65 74 | KEY wil|l be set|
|00000790| 20 74 6f 20 56 41 4c 55 | 45 2e 0a 49 66 20 56 41 | to VALU|E..If VA|
|000007a0| 4c 55 45 20 69 73 20 6e | 6f 74 20 73 75 70 70 6c |LUE is n|ot suppl|
|000007b0| 69 65 64 2c 20 6f 72 20 | 69 73 20 6e 69 6c 2c 20 |ied, or |is nil, |
|000007c0| 74 68 65 20 6b 65 79 2d | 76 61 6c 75 65 20 70 61 |the key-|value pa|
|000007d0| 69 72 20 77 69 6c 6c 20 | 6e 6f 74 20 62 65 0a 6d |ir will |not be.m|
|000007e0| 6f 64 69 66 69 65 64 2c | 20 62 75 74 20 77 69 6c |odified,| but wil|
|000007f0| 6c 20 62 65 20 6d 6f 76 | 65 64 20 74 6f 20 74 68 |l be mov|ed to th|
|00000800| 65 20 68 65 61 64 20 6f | 66 20 74 68 65 20 61 6c |e head o|f the al|
|00000810| 69 73 74 2e 20 49 66 20 | 74 68 65 20 6b 65 79 2d |ist. If |the key-|
|00000820| 76 61 6c 75 65 0a 70 61 | 69 72 20 63 61 6e 6e 6f |value.pa|ir canno|
|00000830| 74 20 62 65 20 66 6f 75 | 6e 64 20 69 6e 20 74 68 |t be fou|nd in th|
|00000840| 65 20 61 6c 69 73 74 2c | 20 69 74 20 77 69 6c 6c |e alist,| it will|
|00000850| 20 62 65 20 69 6e 73 65 | 72 74 65 64 20 69 6e 74 | be inse|rted int|
|00000860| 6f 20 74 68 65 20 68 65 | 61 64 0a 6f 66 20 74 68 |o the he|ad.of th|
|00000870| 65 20 61 6c 69 73 74 20 | 28 77 69 74 68 20 76 61 |e alist |(with va|
|00000880| 6c 75 65 20 6e 69 6c 20 | 69 66 20 56 41 4c 55 45 |lue nil |if VALUE|
|00000890| 20 69 73 20 6e 69 6c 20 | 6f 72 20 6e 6f 74 20 73 | is nil |or not s|
|000008a0| 75 70 70 6c 69 65 64 29 | 2e 1f 0a 28 64 65 66 61 |upplied)|...(defa|
|000008b0| 6c 69 61 73 20 27 61 70 | 75 74 20 23 5b 28 61 6c |lias 'ap|ut #[(al|
|000008c0| 69 73 74 2d 73 79 6d 62 | 6f 6c 20 6b 65 79 20 26 |ist-symb|ol key &|
|000008d0| 6f 70 74 69 6f 6e 61 6c | 20 76 61 6c 75 65 29 20 |optional| value) |
|000008e0| 22 c0 09 5c 6e 5c 22 c3 | 1c 1d c6 0e 07 09 5c 22 |"..\n\".|......\"|
|000008f0| 88 c8 0e 07 21 89 14 84 | 1d 00 0e 07 0d 4c 82 39 |....!...|.....L.9|
|00000900| 00 c9 5c 66 09 5c 22 83 | 2d 00 0e 07 0d 5c 66 a4 |..\f.\".|-....\f.|
|00000910| 4c 82 39 00 5c 6e 83 38 | 00 5c 66 0d 40 a0 82 39 |L.9.\n.8|.\f.@..9|
|00000920| 00 5c 66 2a 87 22 20 5b | 61 65 6c 65 6d 65 6e 74 |.\f*." [|aelement|
|00000930| 20 6b 65 79 20 76 61 6c | 75 65 20 6e 69 6c 20 61 | key val|ue nil a|
|00000940| 6c 69 73 74 20 65 6c 65 | 6d 20 61 73 6f 72 74 20 |list ele|m asort |
|00000950| 61 6c 69 73 74 2d 73 79 | 6d 62 6f 6c 20 65 76 61 |alist-sy|mbol eva|
|00000960| 6c 20 61 6e 6f 74 2d 68 | 65 61 64 2d 70 5d 20 34 |l anot-h|ead-p] 4|
|00000970| 20 28 23 24 20 2e 20 31 | 36 31 34 29 5d 29 0a 23 | (#$ . 1|614)]).#|
|00000980| 40 31 36 30 20 44 65 6c | 65 74 65 20 61 20 6b 65 |@160 Del|ete a ke|
|00000990| 79 2d 76 61 6c 75 65 20 | 70 61 69 72 20 66 72 6f |y-value |pair fro|
|000009a0| 6d 20 74 68 65 20 61 6c | 69 73 74 2e 0a 41 6c 69 |m the al|ist..Ali|
|000009b0| 73 74 20 69 73 20 72 65 | 66 65 72 65 6e 63 65 64 |st is re|ferenced|
|000009c0| 20 62 79 20 41 4c 49 53 | 54 2d 53 59 4d 42 4f 4c | by ALIS|T-SYMBOL|
|000009d0| 20 61 6e 64 20 74 68 65 | 20 6b 65 79 2d 76 61 6c | and the| key-val|
|000009e0| 75 65 20 70 61 69 72 20 | 74 6f 20 72 65 6d 6f 76 |ue pair |to remov|
|000009f0| 65 0a 69 73 20 70 61 69 | 72 20 6d 61 74 63 68 69 |e.is pai|r matchi|
|00000a00| 6e 67 20 4b 45 59 2e 20 | 20 52 65 74 75 72 6e 73 |ng KEY. | Returns|
|00000a10| 20 74 68 65 20 61 6c 74 | 65 72 65 64 20 61 6c 69 | the alt|ered ali|
|00000a20| 73 74 2e 1f 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |st...(de|falias '|
|00000a30| 61 64 65 6c 65 74 65 20 | 23 5b 28 61 6c 69 73 74 |adelete |#[(alist|
|00000a40| 2d 73 79 6d 62 6f 6c 20 | 6b 65 79 29 20 22 c0 09 |-symbol |key) "..|
|00000a50| 5c 6e 5c 22 88 c3 09 21 | 89 1c 84 11 00 c5 82 20 |\n\"...!|....... |
|00000a60| 00 c6 5c 66 5c 6e 5c 22 | 83 1c 00 5c 66 82 20 00 |..\f\n\"|...\f. .|
|00000a70| 09 5c 66 41 4c 29 87 22 | 20 5b 61 73 6f 72 74 20 |.\fAL)."| [asort |
|00000a80| 61 6c 69 73 74 2d 73 79 | 6d 62 6f 6c 20 6b 65 79 |alist-sy|mbol key|
|00000a90| 20 65 76 61 6c 20 61 6c | 69 73 74 20 6e 69 6c 20 | eval al|ist nil |
|00000aa0| 61 6e 6f 74 2d 68 65 61 | 64 2d 70 5d 20 34 20 28 |anot-hea|d-p] 4 (|
|00000ab0| 23 24 20 2e 20 32 34 33 | 37 29 5d 29 0a 23 40 33 |#$ . 243|7)]).#@3|
|00000ac0| 39 34 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 76 |94 Retur|ns the v|
|00000ad0| 61 6c 75 65 20 69 6e 20 | 41 4c 49 53 54 20 74 68 |alue in |ALIST th|
|00000ae0| 61 74 20 69 73 20 61 73 | 73 6f 63 69 61 74 65 64 |at is as|sociated|
|00000af0| 20 77 69 74 68 20 4b 45 | 59 2e 0a 4f 70 74 69 6f | with KE|Y..Optio|
|00000b00| 6e 61 6c 20 4b 45 59 4e | 49 4c 2d 50 20 64 65 73 |nal KEYN|IL-P des|
|00000b10| 63 72 69 62 65 73 20 77 | 68 61 74 20 74 6f 20 64 |cribes w|hat to d|
|00000b20| 6f 20 69 66 20 74 68 65 | 20 76 61 6c 75 65 20 61 |o if the| value a|
|00000b30| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 0a 4b |ssociate|d with.K|
|00000b40| 45 59 20 69 73 20 6e 69 | 6c 2e 20 20 49 66 20 4b |EY is ni|l. If K|
|00000b50| 45 59 4e 49 4c 2d 50 20 | 69 73 20 6e 6f 74 20 73 |EYNIL-P |is not s|
|00000b60| 75 70 70 6c 69 65 64 20 | 6f 72 20 69 73 20 6e 69 |upplied |or is ni|
|00000b70| 6c 2c 20 61 6e 64 20 74 | 68 65 20 76 61 6c 75 65 |l, and t|he value|
|00000b80| 20 69 73 0a 6e 69 6c 2c | 20 74 68 65 6e 20 4b 45 | is.nil,| then KE|
|00000b90| 59 20 69 73 20 72 65 74 | 75 72 6e 65 64 2e 20 20 |Y is ret|urned. |
|00000ba0| 49 66 20 4b 45 59 4e 49 | 4c 2d 50 20 69 73 20 6e |If KEYNI|L-P is n|
|00000bb0| 6f 6e 2d 6e 69 6c 2c 20 | 74 68 65 6e 20 6e 69 6c |on-nil, |then nil|
|00000bc0| 20 77 6f 75 6c 64 20 62 | 65 0a 72 65 74 75 72 6e | would b|e.return|
|00000bd0| 65 64 2e 0a 0a 49 66 20 | 6e 6f 20 6b 65 79 2d 76 |ed...If |no key-v|
|00000be0| 61 6c 75 65 20 70 61 69 | 72 20 6d 61 74 63 68 69 |alue pai|r matchi|
|00000bf0| 6e 67 20 4b 45 59 20 63 | 6f 75 6c 64 20 62 65 20 |ng KEY c|ould be |
|00000c00| 66 6f 75 6e 64 20 69 6e | 20 41 4c 49 53 54 2c 20 |found in| ALIST, |
|00000c10| 6f 72 20 41 4c 49 53 54 | 20 69 73 0a 6e 69 6c 20 |or ALIST| is.nil |
|00000c20| 74 68 65 6e 20 6e 69 6c | 20 69 73 20 72 65 74 75 |then nil| is retu|
|00000c30| 72 6e 65 64 2e 20 41 4c | 49 53 54 20 69 73 20 6e |rned. AL|IST is n|
|00000c40| 6f 74 20 61 6c 74 65 72 | 65 64 2e 1f 0a 28 64 65 |ot alter|ed...(de|
|00000c50| 66 61 6c 69 61 73 20 27 | 61 67 65 74 20 23 5b 28 |falias '|aget #[(|
|00000c60| 61 6c 69 73 74 20 6b 65 | 79 20 26 6f 70 74 69 6f |alist ke|y &optio|
|00000c70| 6e 61 6c 20 6b 65 79 6e | 69 6c 2d 70 29 20 22 c0 |nal keyn|il-p) ".|
|00000c80| 09 21 1a 09 84 5c 66 00 | c3 82 32 00 c4 c2 0d 5c |.!...\f.|..2....\|
|00000c90| 22 88 c6 5c 6e 0d 5c 22 | 83 1c 00 c3 82 32 00 5c |"..\n.\"|.....2.\|
|00000ca0| 6e 40 41 86 32 00 0e 07 | 83 2b 00 c3 82 32 00 5c |n@A.2...|.+...2.\|
|00000cb0| 6e 40 40 86 32 00 c3 29 | 87 22 20 5b 63 6f 70 79 |n@@.2..)|." [copy|
|00000cc0| 2d 61 6c 69 73 74 20 61 | 6c 69 73 74 20 63 6f 70 |-alist a|list cop|
|00000cd0| 79 20 6e 69 6c 20 61 73 | 6f 72 74 20 6b 65 79 20 |y nil as|ort key |
|00000ce0| 61 6e 6f 74 2d 68 65 61 | 64 2d 70 20 6b 65 79 6e |anot-hea|d-p keyn|
|00000cf0| 69 6c 2d 70 5d 20 33 20 | 28 23 24 20 2e 20 32 37 |il-p] 3 |(#$ . 27|
|00000d00| 35 35 29 5d 29 0a 23 40 | 35 35 39 20 4d 61 6b 65 |55)]).#@|559 Make|
|00000d10| 20 61 6e 20 61 73 73 6f | 63 69 61 74 69 6f 6e 20 | an asso|ciation |
|00000d20| 6c 69 73 74 2e 0a 54 68 | 65 20 61 73 73 6f 63 69 |list..Th|e associ|
|00000d30| 61 74 69 6f 6e 20 6c 69 | 73 74 20 69 73 20 61 74 |ation li|st is at|
|00000d40| 74 61 63 68 65 64 20 74 | 6f 20 74 68 65 20 61 6c |tached t|o the al|
|00000d50| 69 73 74 20 72 65 66 65 | 72 65 6e 63 65 64 20 62 |ist refe|renced b|
|00000d60| 79 0a 41 4c 49 53 54 2d | 53 59 4d 42 4f 4c 2e 20 |y.ALIST-|SYMBOL. |
|00000d70| 45 61 63 68 20 65 6c 65 | 6d 65 6e 74 20 69 6e 20 |Each ele|ment in |
|00000d80| 74 68 65 20 4b 45 59 4c | 49 53 54 20 62 65 63 6f |the KEYL|IST beco|
|00000d90| 6d 65 73 20 61 20 6b 65 | 79 20 61 6e 64 20 69 73 |mes a ke|y and is|
|00000da0| 0a 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00000db0| 20 74 68 65 20 76 61 6c | 75 65 20 69 6e 20 56 41 | the val|ue in VA|
|00000dc0| 4c 55 45 4c 49 53 54 20 | 77 69 74 68 20 74 68 65 |LUELIST |with the|
|00000dd0| 20 73 61 6d 65 20 69 6e | 64 65 78 2e 20 49 66 0a | same in|dex. If.|
|00000de0| 56 41 4c 55 45 4c 49 53 | 54 20 69 73 20 6e 6f 74 |VALUELIS|T is not|
|00000df0| 20 73 75 70 70 6c 69 65 | 64 20 6f 72 20 69 73 20 | supplie|d or is |
|00000e00| 6e 69 6c 2c 20 74 68 65 | 6e 20 65 61 63 68 20 6b |nil, the|n each k|
|00000e10| 65 79 20 69 6e 20 4b 45 | 59 4c 49 53 54 20 69 73 |ey in KE|YLIST is|
|00000e20| 0a 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 |.associa|ted with|
|00000e30| 20 6e 69 6c 2e 0a 0a 4b | 45 59 4c 49 53 54 20 61 | nil...K|EYLIST a|
|00000e40| 6e 64 20 56 41 4c 55 45 | 4c 49 53 54 20 73 68 6f |nd VALUE|LIST sho|
|00000e50| 75 6c 64 20 68 61 76 65 | 20 74 68 65 20 73 61 6d |uld have| the sam|
|00000e60| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 65 6c 65 6d |e number| of elem|
|00000e70| 65 6e 74 73 2c 20 62 75 | 74 0a 74 68 69 73 20 69 |ents, bu|t.this i|
|00000e80| 73 6e 27 74 20 65 6e 66 | 6f 72 63 65 64 2e 20 20 |sn't enf|orced. |
|00000e90| 49 66 20 56 41 4c 55 45 | 4c 49 53 54 20 69 73 20 |If VALUE|LIST is |
|00000ea0| 73 6d 61 6c 6c 65 72 20 | 74 68 61 6e 20 4b 45 59 |smaller |than KEY|
|00000eb0| 4c 49 53 54 2c 20 72 65 | 6d 61 69 6e 69 6e 67 0a |LIST, re|maining.|
|00000ec0| 6b 65 79 73 20 61 72 65 | 20 61 73 73 6f 63 69 61 |keys are| associa|
|00000ed0| 74 65 64 20 77 69 74 68 | 20 6e 69 6c 2e 20 20 49 |ted with| nil. I|
|00000ee0| 66 20 56 41 4c 55 45 4c | 49 53 54 20 69 73 20 6c |f VALUEL|IST is l|
|00000ef0| 61 72 67 65 72 20 74 68 | 61 6e 20 4b 45 59 4c 49 |arger th|an KEYLI|
|00000f00| 53 54 2c 0a 65 78 74 72 | 61 20 76 61 6c 75 65 73 |ST,.extr|a values|
|00000f10| 20 61 72 65 20 69 67 6e | 6f 72 65 64 2e 20 20 52 | are ign|ored. R|
|00000f20| 65 74 75 72 6e 73 20 74 | 68 65 20 63 72 65 61 74 |eturns t|he creat|
|00000f30| 65 64 20 61 6c 69 73 74 | 2e 1f 0a 28 64 65 66 61 |ed alist|...(defa|
|00000f40| 6c 69 61 73 20 27 61 6d | 61 6b 65 20 23 5b 28 61 |lias 'am|ake #[(a|
|00000f50| 6c 69 73 74 2d 73 79 6d | 62 6f 6c 20 6b 65 79 6c |list-sym|bol keyl|
|00000f60| 69 73 74 20 26 6f 70 74 | 69 6f 6e 61 6c 20 76 61 |ist &opt|ional va|
|00000f70| 6c 75 65 6c 69 73 74 29 | 20 22 08 40 08 41 09 40 |luelist)| ".@.A.@|
|00000f80| 09 41 1a 1b 1c 1d 5c 66 | 84 1a 00 c6 0e 07 0d 0b |.A....\f|........|
|00000f90| 23 88 82 28 00 c8 0e 07 | 5c 66 5c 6e 23 88 c6 0e |#..(....|\f\n#...|
|00000fa0| 07 0d 0b 23 88 2c c9 0e | 07 21 87 22 20 5b 6b 65 |...#.,..|.!." [ke|
|00000fb0| 79 6c 69 73 74 20 76 61 | 6c 75 65 6c 69 73 74 20 |ylist va|luelist |
|00000fc0| 76 61 6c 63 64 72 20 76 | 61 6c 63 61 72 20 6b 65 |valcdr v|alcar ke|
|00000fd0| 79 63 64 72 20 6b 65 79 | 63 61 72 20 61 70 75 74 |ycdr key|car aput|
|00000fe0| 20 61 6c 69 73 74 2d 73 | 79 6d 62 6f 6c 20 61 6d | alist-s|ymbol am|
|00000ff0| 61 6b 65 20 65 76 61 6c | 5d 20 34 20 28 23 24 20 |ake eval|] 4 (#$ |
|00001000| 2e 20 33 33 34 30 29 5d | 29 0a 28 70 72 6f 76 69 |. 3340)]|).(provi|
|00001010| 64 65 20 28 71 75 6f 74 | 65 20 61 73 73 6f 63 29 |de (quot|e assoc)|
|00001020| 29 0a | |). | |
+--------+-------------------------+-------------------------+--------+--------+